/**
 * 
 * merge level=72
 * 
 * Topregion的 view 定义
 */

Ext.define('Jfok.view.region.TopRegion', {
			extend : 'Ext.toolbar.Toolbar',
			alias : 'widget.topregion',
			requires : ['Jfok.shared.ThemeSelect', 'Jfok.view.widget.MonetarySelect',
					'Jfok.lib.ButtonTransparent', 'Jfok.lib.AdditionFieldAddButton',
					'Jfok.lib.AdditionFieldDisplayButton',
					'Jfok.lib.ManyToOneFieldDisplayButton',
					'Jfok.module.widget.ComboModuleGrid'],
			height : 40,
			baseCls : 'index-header',
			cls : 'topheader-' + Cookies.get('theme', 'neptune'),

			initComponent : function() {
				this.defaults = {
					xtype : 'buttontransparent'
				};
				this.items = [{
							xtype : 'image',
							margin : '15 5 0 10',
							width : 16,
							height : 16,
							src : 'images/system/favicon16.png'
						}, {
							xtype : 'label',
							text : Jfok.system.tf_systemName,
							baseCls : 'index-title'
						}, {
							xtype : 'label',
							text : '(' + Jfok.system['tf_systemVersion'] + ')',
							baseCls : 'index-title-ver'
						}, {
							id : 'homepagebutton',
							text : '首页',
							margin : '0 20 0 30',
							action : 'homepage',
							icon : 'images/button/homepage.png',
							handler : function(button) {
							}
						}, {
							text : '帮助',
							margin : '0 20 0 0',
							icon : 'images/button/help.png',
							handler : function() {
								localStorage.setItem('abc', 'this is a abcdefg');

							}
						}, {
							text : '关于',
							icon : 'images/button/about.png',
							margin : '0 20 0 0',
							handler : function(buton) {
								Ext.create('Jfok.view.window.AboutWindow').show();
							}
						}, {
							text : '注销',
							icon : 'images/button/return.png',
							action : 'logout'
						}, '->', {
							xtype : 'monetaryselect'
						}, {
							xtype : 'themeselect',
							margin : '0 5 0 5'
						}

						
					//	,Ext.create('Jfok.lib.GridPicker')

						

				];
				this.callParent(arguments);
			}
		});